<template>
    <div id="Policy">
        <h3 class="l-title">{{formData.title}}</h3>
        <p class="l-sub">{{formData.createuser}}</p>
        <p class="l-date">{{formData.createTime}}</p>
        <div class="l-text" v-html="formData.policytext"></div>
    </div>
</template>
<script lang="ts">
    import Vue, {ComponentOptions, VueConstructor} from "vue"
    import Component from 'vue-class-component'
    import {Prop} from "vue-property-decorator";
    import {requestByGet, requestByPost} from "@/utils/request";

    @Component
    export default class Policy extends Vue implements ComponentOptions<Vue> {
        name = "Policy";
        @Prop() customId!: string;
        formData = {}
        async created() {
            this.formData = await requestByGet(`/qqc/qqcPolicy/queryById`, {id: this.customId})
        }
    }
</script>

<style scoped lang="scss">
    @import "~assets/common.scss";
    #Policy {
        padding: 16px;
        background: #fff;
        min-height: 100vh;
        box-sizing: border-box;
        .l-title {
            font-size: 22px;
            color: $strong-clr;
        }
        .l-sub {
            font-size: 12px;
            color: #999;
            margin: 22px 0 16px;
        }
        .l-date {
            font-size: 12px;
            color: #999;
        }
        .l-text {
            margin-top: 20px;
            line-height: 1.6;
        }
    }
</style>
